﻿namespace InSiteXmlClient4Core.InterFace
{
    /// <summary>
    /// 字段定义
    /// </summary>
    public interface ICsiFieldDefinition : ICsiXmlElement
    {
        /// <summary>
        /// 获取数据类型
        /// </summary>
        /// <returns></returns>
        string GetDataType();
        /// <summary>
        /// 获取CDO类型
        /// </summary>
        /// <returns></returns>
        ICsiCdoType GetFieldCdoType();
        /// <summary>
        /// 获取字段ID
        /// </summary>
        /// <returns></returns>
        int GetFieldId();
        /// <summary>
        /// 获取字段标签
        /// </summary>
        /// <returns></returns>
        ICsiLabel GetFieldLabel();
        /// <summary>
        /// 获取字段名称
        /// </summary>
        /// <returns></returns>
        string GetFieldName();
        /// <summary>
        /// 枚举选择的值
        /// </summary>
        /// <returns></returns>
        bool HasSelectionValues();
        /// <summary>
        /// 是否隐藏
        /// </summary>
        /// <returns></returns>
        bool IsHidden();
        /// <summary>
        /// 是否集合
        /// </summary>
        /// <returns></returns>
        bool IsListField();
        /// <summary>
        /// 是否为Object字段
        /// </summary>
        /// <returns></returns>
        bool IsObjectField();
        /// <summary>
        /// 是否只读
        /// </summary>
        /// <returns></returns>
        bool IsReadOnly();
        /// <summary>
        /// 是否为必需
        /// </summary>
        /// <returns></returns>
        bool IsRequired();
        /// <summary>
        /// 是否类型约束
        /// </summary>
        /// <returns></returns>
        bool IsTypeUnique();
        /// <summary>
        /// 是否为用户定义字段
        /// </summary>
        /// <returns></returns>
        bool IsUserDefinedField();
        /// <summary>
        /// 值必须输入
        /// </summary>
        /// <returns></returns>
        bool IsValueRequired();
        /// <summary>
        /// 拥有对象
        /// </summary>
        /// <returns></returns>
        bool OwnsObject();
    }
}